<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/11/7
  Time: 16:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/mb/jsp/common.jsp" %>
<%@ page import="com.limao.servlet.WebFunction" %>
<%@ page import="com.limao.DBDataClass.CrowdUserAuthClass" %>

<%
    String userid=CacheClass.isLogin(request,response);
    if (CacheClass.getIntValue(userid) == 0) {
        out.println("<script language='JavaScript'>alert('您还没有登陆！');location.href=document.referrer;</script>"); //后退并刷新
        return;
    }
    CrowdUserAuthClass user = WebFunction.getUserInfo(request, response);
    if (user == null) {
        out.println("<script language='JavaScript'>alert('用户不存在，或被平台禁用，请联系客服！');window.history.back(-1);</script>");
        return;
    }
%>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>邀约</title>

    <script src="mb/js/jquery.qrcode.js"></script>
    <script src="mb/js/utf.js"></script>
    <style>
    .jiathis_weixin_modal{
	    margin: -34vh auto;
	    overflow: hidden;
	    width: 90%;
	    height: 360px;
	}
    </style>

</head>
<body ontouchstart="" class="h100 of">

<div class="detailTop pf w100 of">
    <div class="w100 of tc cf f18">
      		  邀约
       <a href="javascript:invite($('#inviteDiv'),$('.mask-black-min'));" class="db of pa" style="right: 10px;top:4px;border:none">
            <img alt="邀约icon" src="mb/images/img152.png" style="height: 21px;">
        </a>
    </div>
</div>

<div class="container db jz mgt45">

    <section class="w100 pr">
    	<img src="mb/images/yaoyue1.png"  alt="七彩云购" class="w100 hauto">
    </section>
    <article class="w100 of pf" style="bottom:53.5px;height: 52%;">
    	<div class="of w100 h100 pr">
    		<p class="f16 lh2 cf tc w100 pa" style="margin-top: 2.5%;">扫描注册,下载APP</p>
    		<img src="mb/images/yaoyue2.png"  alt="七彩云购" class="w100 h100">
    	</div>
    </article>
    <div class="myqrcode w100 of">
		        <div id="qrcodeCanvas" class="jz db"></div>
		
		       
	</div>
    
    <style>
	    .jiathis_style_32x32 .jtico{
	        padding-left: 32px!important;
	        margin:0 5px;
	    }
    </style>
   <section id="inviteDiv" class="inviteDiv pa w100">
            <div class="jz inviteBlock w100">
                <!-- JiaThis Button BEGIN -->
				<div class="jiathis_style_32x32 dib jz flexCenter">
					<a class="jiathis_button_weixin dib fl"></a>
					<a class="jiathis_button_cqq dib fl"></a>
					<a class="jiathis_button_tsina dib fl"></a>
					<a class="jiathis_button_tqq dib fl"></a>
					<a class="jiathis_button_qzone dib fl"></a>
				<!-- 	<a href="http://www.jiathis.com/share?uid=2126565" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a> -->
				</div>
				<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=2126565" charset="utf-8"></script>
				<!-- JiaThis Button END -->
            </div>
            <a href="javascript:cancelInvite($('#inviteDiv'),$('.mask-black-min'));" class="lh2 tc f15 mgt10 cblue db jz">取消</a>
    </section>
</div>

  	<!--footer-->
	<footer id="footer" class="footerTab w100 of pf">
	 
	</footer>

<script type="text/javascript">
      $(window).on("load", function() {
				$("#footer").load("mb/footer.jsp", function() {
				  footerTab(2);
				});
	    })
	  
	  
	   //分享
	   function invite(inviteDiv,mask){
	    	inviteDiv.slideToggle();
	    	if(mask!=""){
	    		mask.fadeToggle();
	    	}
	    	mask.click(function(){
	    		inviteDiv.slideUp();
	    		mask.fadeOut();
	    	})
	    }
	  
	  function cancelInvite(inviteDiv,mask){
	  		inviteDiv.slideUp();
	    		mask.fadeOut();
	  }

    $(document).ready(function () {
        $("#qrcodeCanvas").qrcode({
            render: "canvas",    //设置渲染方式，有table和canvas，使用canvas方式渲染性能相对来说比较好
            text: "<%=user.qrcodeurl%>",    //扫描二维码后显示的内容,可以直接填一个网址，扫描二维码后自动跳向该链接
            width: "118",               //二维码的宽度
            height: "118",              //二维码的高度
            background: "#ffffff",       //二维码的后景色
            foreground: "#000000",        //二维码的前景色
            src: 'mb/images/logo4.png'             //二维码中间的图片
        });
    });
    
    	var urlstr='<%=basePath%>'+'mb/jsp/share.jsp?shareid='+'<%=userid%>';
				//urlstr=$('#qrcode').val();
				var jiathis_config={
					data_track_clickback:true,
					url:urlstr,
					summary:"这是我的二维码，可以来看看哦...",
					title:"我的二维码",
					shortUrl:false,
					hideMore:false
				}

</script>


</body>
</html>
